// 退出登录
import request from "../utils/request";
import {apiDataType, apiIdType} from "types";
import qs from "qs";

// 列表
export function getGraciousness(data: apiDataType) {
    return request({
        url: '/grid/gridcenter/communityVenue/list',
        method: 'post',
        headers: {'Content-Type': 'application/json'},
        data
    })
}

// 编辑
export function updateGraciousness(data: unknown) {
    return request({
        url: '/grid/gridcenter/communityVenue/update',
        method: 'post',
        headers: {'Content-Type': 'application/json'},
        data
    })
}

// 新增
export function insertGraciousness(data: unknown) {
    return request({
        url: '/grid/gridcenter/communityVenue/insert',
        method: 'post',
        data
    })
}

// 详情
export function detailGraciousness(id: apiIdType) {
    return request({
        url: '/grid/gridcenter/communityVenue/detail',
        method: 'post',
        headers: {'Content-Type': 'application/x-www-form-urlencoded'},
        data: qs.stringify({id})
    })
}

// 删除
export function deleteGraciousness(id: string) {
    return request({
        url: '/grid/gridcenter/communityVenue/delete',
        method: 'post',
        headers: {'Content-Type': 'application/x-www-form-urlencoded'},
        data: qs.stringify({id})
    })
}